<template>
    <div class="weekend">
        <div class="weekend-title">周末去哪儿</div>
        <ul>
            <router-link tag="li" class="item border-bottom" v-for="item of list" :key="item.id" :to="'/detail/'+ item.id">
                <div class="item-img-wrapper">
                    <img width="100%" :src="item.imgUrl" alt="">
                </div>
                <div class="item-info">
                    <p class="item-title">{{item.title}}</p>
                    <p class="item-desc">{{item.desc}}</p>
                </div>
            </router-link>
        </ul>
    </div>
</template>
<script>
export default {
  name: 'Weekend',
  props: {
    list: Array
  },
  data () {
    return {
      weekendList: [
        {id: '0001', imgUrl: 'http://img1.qunarzz.com/sight/source/1505/aa/7baaf8a851d221.jpg_r_640x214_1431200f.jpg', title:'大连剩下海洋世界', desc:'大连剩下海洋世界'},
        {id: '0002', imgUrl: 'http://img1.qunarzz.com/sight/source/1505/b2/fde1bfcd057a52.jpg_r_640x214_bbf3fa44.jpg', title:'大连剩下海洋世界', desc:'大连剩下海洋世界,浪漫大连首站'},
        {id: '0003', imgUrl: 'http://img1.qunarzz.com/sight/source/1505/9e/21df651e19af5d.jpg_r_640x214_3ea5bb38.jpg', title:'大连剩下海洋世界', desc:'大连剩下海洋世界'},
        {id: '0004', imgUrl: 'http://img1.qunarzz.com/sight/source/1505/ce/bc89bc2f0e33ea.jpg_r_640x214_3e408453.jpg', title:'大连剩下海洋世界', desc:'大连剩下海洋世界'},
        {id: '0005', imgUrl: 'http://img1.qunarzz.com/sight/source/1509/81/0412da9c4db66a.jpg_r_640x214_8e23871e.jpg', title:'大连剩下海洋世界', desc:'大连剩下海洋世界'}
      ]
    }
  }
}
</script>
<style lang="stylus" scoped>
  @import '~styles/mixins.styl'
  .weekend
    .weekend-title
      line-height: .8rem
      background: #eeeeee
      text-indent: .2rem
    .item-img-wrapper
        overflow: hidden 
        height: 0
        // padding-bottom: 33.9%
        padding-bottom: 37.09%
    .item-info
        padding: .1rem
      .item-title
        line-height: .54rem
        font-size: .32rem
        ellipsis()
      .item-desc
        line-height: .4rem
        color: #666666
        ellipsis()
</style>
